package com.ruoyi.clothing.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.clothing.mapper.SysOrderGoodsMapper;
import com.ruoyi.clothing.domain.SysOrderGoods;
import com.ruoyi.clothing.service.ISysOrderGoodsService;

/**
 * 订单管理Service业务层处理
 *
 * @author weh
 * @date 2024-01-18
 */
@Service
public class SysOrderGoodsServiceImpl implements ISysOrderGoodsService
{
    @Autowired
    private SysOrderGoodsMapper sysOrderGoodsMapper;

    /**
     * 查询订单管理
     *
     * @param id 订单管理主键
     * @return 订单管理
     */
    @Override
    public SysOrderGoods selectSysOrderGoodsById(Integer id)
    {
        return sysOrderGoodsMapper.selectSysOrderGoodsById(id);
    }

    /**
     * 查询订单管理列表
     *
     * @param sysOrderGoods 订单管理
     * @return 订单管理
     */
    @Override
    public List<SysOrderGoods> selectSysOrderGoodsList(SysOrderGoods sysOrderGoods)
    {
        return sysOrderGoodsMapper.selectSysOrderGoodsList(sysOrderGoods);
    }

    /**
     * 新增订单管理
     *
     * @param sysOrderGoods 订单管理
     * @return 结果
     */
    @Override
    public int insertSysOrderGoods(SysOrderGoods sysOrderGoods)
    {
        return sysOrderGoodsMapper.insertSysOrderGoods(sysOrderGoods);
    }

    /**
     * 修改订单管理
     *
     * @param sysOrderGoods 订单管理
     * @return 结果
     */
    @Override
    public int updateSysOrderGoods(SysOrderGoods sysOrderGoods)
    {
        return sysOrderGoodsMapper.updateSysOrderGoods(sysOrderGoods);
    }

    /**
     * 批量删除订单管理
     *
     * @param ids 需要删除的订单管理主键
     * @return 结果
     */
    @Override
    public int deleteSysOrderGoodsByIds(Integer[] ids)
    {
        return sysOrderGoodsMapper.deleteSysOrderGoodsByIds(ids);
    }

    /**
     * 删除订单管理信息
     *
     * @param id 订单管理主键
     * @return 结果
     */
    @Override
    public int deleteSysOrderGoodsById(Integer id)
    {
        return sysOrderGoodsMapper.deleteSysOrderGoodsById(id);
    }

    @Override
    public int placeOrder(SysOrderGoods sysOrderGoods) {
        return sysOrderGoodsMapper.placeOrder(sysOrderGoods);
    }

    @Override
    public List<SysOrderGoods> selectOrderGoodsByStatus(Integer status) {
        return sysOrderGoodsMapper.selectOrderGoodsByStatus(status);
    }

    @Override
    public List<SysOrderGoods> selectOrderGoodsById(Integer user_id) {
        return sysOrderGoodsMapper.selectOrderGoodsById(user_id);
    }

    @Override
    public int deleteOrderGoodsById(Integer id) {
        return sysOrderGoodsMapper.deleteOrderGoodsById(id);
    }
}
